import { Cell, CellGroup } from 'react-vant'
import { history } from 'umi'

export default function DebugPage() {
  function handleClick(code: string) {
    history.push(`/result?id=28&city=上海&code=${code}`)
  }

  return (
    <section className="min-h-screen bg-white ">
      <CellGroup title="模拟天气">
        <Cell title="晴天" isLink onClick={() => handleClick('sunny')} />
        <Cell
          title="阴天"
          isLink
          onClick={() => handleClick('overcast')}
        />
        <Cell title="雨" isLink onClick={() => handleClick('rain')} />
        <Cell title="雪" isLink onClick={() => handleClick('snow')} />
        <Cell title="霾" isLink onClick={() => handleClick('haze')} />
        <Cell title="雾" isLink onClick={() => handleClick('fog')} />
        <Cell title="沙尘" isLink onClick={() => handleClick('sand')} />
      </CellGroup>
    </section>
  )
}
